#ifndef CHATHANDLER_H
#define CHATHANDLER_H

#include <QObject>
#include "tunnel_struckts.h"

class ClientSocket;
class ChatHandler : public QObject
{
    Q_OBJECT

public:
    ChatHandler(QObject *parent = 0);

    bool handlePackage(Package *package);
    void handleNewMessage(const QString &from, QString &message);
    void handleSystemCommand(const quint16 &category, const quint16 &command, const QString &arguments);

signals:
    void newMessage(const QString &from, QString &message);
    void authCommand(const QString &arguments);
    void updateFriendlist(QString sFriendlist);
    void incommingFriendrequest(QString sFriendrequests);
    void cError(const QString &error);

};

#endif // CHATHANDLER_H
